<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>数组对象</title>
	<script type="text/javascript">

		var arr =[345,345,3,3,47,45,45,4];

		var arr1 = [345,3,7,7];

		// arr[100] =90;

		document.write(arr+"<br>");

		// arr.splice(2,0,999);
		// 
		// arr1 = arr.join('*');

		newarr = arr.concat(arr1);

		document.write(newarr+"<br>");

		// alert(arr.length);

		// console.log(arr);
		// 
		
		var arr = [456,3,2,23,2,2];

		// [2,2,23,2,3,456]

		document.write(arr+"<br>");

		function arrsort (data) {

			var newArr =[];

			for (var i = data.length-1; i >= 0; i--) {
				newArr.push(data[i]);
			};

			return newArr;
			
		}

		var res = arrsort(arr);

		document.write(res);


		var a =90;
		var b =100;

		var tmp = a;
		a = b;
		b = tmp;


		//最大找出来
		arr = [1,56,23,6,43,87,3,5,55];

		//返回奇数乘以2
		arr = [2,56,46,6,86,174,6,10,110];

		//去重
		arr = [2,56,46,6,6,86,174,6,10,110,10];

		//排序
		arr = [1,5,8,9,4,6,3,2];




	</script>
</head>
<body>
	
</body>
</html>